<div class="notification error">
    <h4>Error notification</h4>
    <p>There are errors in your form.</p>

    <?php if(isset($errorList) && !empty($errorList)) : ?>
    <a class="show-notification-details" href="javascript:void(0)">[ + ] Show Details</a>
    <ul class="notification-details" style="display: none;">
        <?php echo html_entity_decode($errorList)?>
    </ul>
    <?php endif; ?>
</div>


<?php if(isset($errorList) && !empty($errorList)) : ?>
<script type="text/javascript">
$(document).ready(function(){
	$(".show-notification-details").click(function(){
		$(".notification-details").slideToggle();
		if($(this).html() == "[ + ] Show Details")
			$(this).html("[ - ] Show Details");
		else
			$(this).html("[ + ] Show Details");
	});
});
</script>
<?php endif;?>